<template>
	<div class="device">
		<van-nav-bar title="设备信息" left-arrow="" @click-left='goBack()'>
		</van-nav-bar>
		
		<deviceList @goNext='goNext' :deviceList='deviceList'></deviceList>
	</div>
</template>

<script>
	import deviceList from '../subcom/deviceList.vue'
	export default{
		data(){
			return{
				deviceList:[],
				showkeywords:false
			}
		},
		created() {
			this.getDevice()
		},
		methods:{
			getDevice(){
				this.$axios.get(this.url.getAllDevice).then(res=>{
					if(res.data.status === 200){
						this.deviceList = res.data.msg
						console.log(this.deviceList)
					}
				})
			},
			goNext(id){
				this.$router.push({name:'deviceInfo',params:{isScan:false,id:id}})
			},
		},
		components:{
			deviceList
		}
	}
</script>

<style scoped="scoped">
</style>
